<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>9.练习1：运算符-递增</title>
    <script>
        var a = 10;// 10
        ++a;// 11 a=11
        var b = ++a + 2;//  ++a=12 + 2 = 14
        console.log(b);// 14
        console.log('-------------------------------------');

        var c = 10;// 10
        c++;// 11
        var d = c++ + 2;// c++=11 + 2 = 13    c=12
        console.log(d);// 13
        console.log('-------------------------------------');

        var e = 10;// 10
        var f = e++ + ++e;// e++=10 + ++e=12 = 21 此时e已经等于11了 ++e=12
        console.log(f);// 22
        console.log('-------------------------------------');
    </script>
</head>

<body>

</body>

</html>